2023-12-13

The Toronto Transit Commission (TTC) is Toronto’s public transportation system. It is a vast network that covers Toronto and the surrounding municipalities, which are collectively known as the Greater Toronto Area (GTA). The bus system is extensive, with routes that reach almost every corner of the city. The TTC operates subways, buses, and streetcars throughout the region.

The data for this analysis includes information on buses only.

The data set is skewed because it primarily includes data for late buses. This means that it does not provide an extensive representation of on-time buses. The data set contains data for the first six months of 2022, from January to June.

## Number of rows and columns: 27351 rows, 12 columns
## Number of unique BUS ROUTES: 224

Does the frequency of bus delays vary with the season?

The data supplied 15 incidents for why a bus was late. The data provided 15 reasons for a bus to be late. The following is a table of the reasons, including frequency, and the percentage of occurrences:

incident count percentage
Operations - Operator 9554 34.93
Mechanical 7979 29.17
Collision - TTC 1823 6.67
Security 1593 5.82
Diversion 1259 4.60
General Delay 1229 4.49
Emergency Services 1114 4.07
Utilized Off Route 1080 3.95
Cleaning - Unsanitary 562 2.05
Investigation 409 1.50
Road Blocked - NON-TTC Collision 321 1.17
Vision 307 1.12
Held By 93 0.34
Late Entering Service 23 0.08
Cleaning - Disinfection 5 0.02

The three most notable reasons for bus delays—operations (operator), mechanical, and vision—do not exhibit a linear or seasonal relationship between the time of year and the type of delay.

Does time of day impact bus schedules?

In Toronto, buses operate 24 hours a day, 7 days a week. The bus schedule may vary depending on the day of the week and the time of year. One question that arises is whether the time of day affects the likelihood of a bus being late.

Does rush hour impact bus schedules?

During rush hour, which is typically between 7 a.m. and 9 a.m. and 5 p.m. and 7 p.m., are buses more likely to be late?

The bus is most likely to be late on which day of the week?

Sunday was the day of the week that a bus was most likely to be late with an average delay of 25 minutes.

Tuesday was the day of the week that a bus was most likely to be on time with an average delay of 17 minutes.

All Bus routes

There are 224 bus routes in this data set.

Late Busses

Is there a bus route that is consistently later than others?

On Time Busses

Is there a bus route that is more punctual than others?

The model predicts the average {min_delay} to be 21 mins.

A p-value of 0.027, is less than the commonly used significance level of 0.05. This suggests that there is evidence to reject the null hypothesis that the intercept is zero.

.
term estimate std.error statistic p.value
(Intercept) 21.83 0.76 28.89 0.00
time_2 -0.12 0.05 -2.21 0.03
## We fitted a linear model (estimated using OLS) to predict min_delay with time_2
## (formula: min_delay ~ time_2). The model explains a statistically significant
## and very weak proportion of variance (R2 = 1.79e-04, F(1, 27349) = 4.90, p =
## 0.027, adj. R2 = 1.42e-04). The model's intercept, corresponding to time_2 = 0,
## is at 21.83 (95% CI [20.35, 23.32], t(27349) = 28.89, p < .001). Within this
## model:
## 
##   - The effect of time 2 is statistically significant and negative (beta = -0.12,
## 95% CI [-0.22, -0.01], t(27349) = -2.21, p = 0.027; Std. beta = -0.01, 95% CI
## [-0.03, -1.53e-03])
## 
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.

Citations:

Data source Toronto Bus Delay 2022 dataset Reihane Namdari Kaggle: https://www.kaggle.com/datasets/reihanenamdari/toronto-bus-delay-2022

Additional Information:

[1] Wikipedia. Toronto. https://en.wikipedia.org/wiki/

[2] Arrivein. Daily Life in Canada - Getting Around: How to Use Public Transportation in Toronto. https://arrivein.com/daily-life-in-canada/getting-around-how-to-use-public-transportation-in-toronto/

[3] Prepare for Canada. Public Transportation System in Toronto - Ride the TTC. https://www.prepareforcanada.com/choosing-a-city/toronto/public-transportation-system-in-torontoride-the-ttc/

[4] Apollo Cover Magazine. Toronto Public Transportation. https://apollocover.com/magazine/toronto-public-transportation

[5] Wikipedia. Toronto Transit Commission bus system. https://en.wikipedia.org/wiki/Toronto_Transit_Commission_bus_system

[6] U.S. News & World Report. Toronto - Getting Around. https://travel.usnews.com/Toronto/Getting_Around/